#import "QuestLuminaryController.h"
        
#import "QuestLuminaryModel.h"
#import "QuestLuminaryCell.h"
#import "Masonry.h"

@interface QuestLuminaryController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *journeyTableView;
@property (nonatomic, strong) NSMutableArray *yarnKineticZestArr;

@end

@implementation QuestLuminaryController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self soarWindfallSetupui];
	[self yonderUmbrellaHazerequestData];
}


- (UITableView *)figHandleTableView {
    if (!_journeyTableView) {
        _journeyTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _journeyTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _journeyTableView.estimatedRowHeight = 0;
        _journeyTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _journeyTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _journeyTableView.delegate = self;
        _journeyTableView.dataSource = self;
        _journeyTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _journeyTableView.showsVerticalScrollIndicator = NO;
        _journeyTableView.showsHorizontalScrollIndicator = NO;
        _journeyTableView.backgroundColor = UIColor.clearColor;
    }
    return _journeyTableView;
}

//: 获取数据模型
- (void)yonderUmbrellaHazerequestData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)yarnKineticZestArr {
	if (!_yarnKineticZestArr) {
		_yarnKineticZestArr = [NSMutableArray array];
	}
	return _yarnKineticZestArr;
}

//: 初始化页面UI
- (void)soarWindfallSetupui {

	[self.view addSubview:self.journeyTableView];
	[self.journeyTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.yarnKineticZestArr.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    QuestLuminaryCell *questLeapfrogGrin = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([QuestLuminaryCell class])];
    if (questLeapfrogGrin == nil) {
        questLeapfrogGrin = [[QuestLuminaryCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([QuestLuminaryCell class])];
    }
    questLeapfrogGrin.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return questLeapfrogGrin;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
	QuestLuminaryModel *quakeFlexibilityUmbrella = self.yarnKineticZestArr[indexPath.row];
	return quakeFlexibilityUmbrella.rippleBalloonBalanceCellHeight;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
